package com.heaven.controller;

import com.heaven.service.IntroService;
import com.heaven.vo.PageResult;
import com.heaven.vo.SysResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@CrossOrigin
public class IntroController {
    @Autowired
    private IntroService introService;
    @GetMapping("/intro/lists")
    public SysResult findIntro(PageResult pageResult){
        pageResult=introService.findIntro(pageResult);
        return SysResult.success(pageResult);
    }
    @DeleteMapping("/get/{id}")
    public SysResult deleteIntroById(@PathVariable Integer id){
        introService.deleteIntroById(id);
        return SysResult.success();

    }
}
